using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using DotNetNuke;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;

namespace YourCompany.Modules.Cafeteria
{
	public class CafeteriaController
	{

		#region public method

		public List<Cafeteria> GetCafeteriaList()
		{
			return CBO.FillCollection<Cafeteria>(DataProvider.Instance().GetCafeteriaList());
		}

		public Cafeteria GetCafeteria(int ItemID)
		{
			return (Cafeteria)CBO.FillObject(DataProvider.Instance().GetCafeteria(ItemID), typeof(Cafeteria));
		}

		public void AddCafeteria(Cafeteria cafeteria)
		{
			DataProvider.Instance().AddCafeteria(cafeteria.ItemName, cafeteria.ItemPrice);
		}

		public void UpdateCafeteria(Cafeteria cafeteria)
		{
			DataProvider.Instance().UpdateCafeteria(cafeteria.ItemID, cafeteria.ItemName, cafeteria.ItemPrice);
		}

		public void DeleteCafeteria(Cafeteria cafeteria)
		{
			DataProvider.Instance().DeleteCafeteria(cafeteria.ItemID);
		}

		#endregion

	}
}
